# -*- mode: python ; coding: utf-8 -*-

block_cipher = None


a = Analysis(
    ['main.py'],
    pathex=['e:\\DXM\\code\\ccs_git\\tapd_tool'],
    binaries=[],
    # 确保在开发环境和打包环境中都能找到files目录
    datas=[
        ('files', 'files'),
        ('comm', 'comm'),
        ('function_code', 'function_code'),
        ('tapd_capture_api', 'tapd_capture_api'),
        ('tapd_open_api', 'tapd_open_api'),
        ('ui_code', 'ui_code'),
        ('other', 'other'),
        ('app.ico', '.')
    ],
    hiddenimports=[
        'PyQt5.sip',
        'PyQt5.QtCore',
        'PyQt5.QtGui',
        'PyQt5.QtWidgets',
        'pandas',
        'openpyxl',
        'xlsxwriter',
        'xmindparser',
        'requests',
        'retrying',
        'urllib3',
        'certifi',
        'python_json_logger'
    ],
    hookspath=[],
    hooksconfig={},
    runtime_hooks=[],
    excludes=[],
    win_no_prefer_redirects=False,
    win_private_assemblies=False,
    cipher=block_cipher,
    noarchive=False,
)

pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)


exe = EXE(
    pyz,
    a.scripts,
    a.binaries,
    a.zipfiles,
    a.datas,
    [],
    name='tapd_tool',
    debug=False,
    bootloader_ignore_signals=False,
    strip=False,
    upx=True,
    upx_exclude=[],
    runtime_tmpdir=None,
    console=True,  # 显示命令行窗口
    disable_windowed_traceback=False,
    argv_emulation=False,
    target_arch=None,
    codesign_identity=None,
    entitlements_file=None,
    icon='app.ico'  # 使用指定的图标
)